<template>
  <div class="item" @click="navTo">
    <div class="item__top">
      <div class="item__top-title">{{info.order_no}}</div>
      <div class="item__top-status">{{info.status_text}}</div>
    </div>
    <div class="item__bottom">
      <div class="item__bottom-date">下单日期：{{info.createtime}}</div>
      <div class="item__bottom-number">订单数量：{{info.nums}}</div>
    </div>
  </div>
</template>

<script setup>
  import {useRouter} from "vue-router";

  const props= defineProps(['info'])
  const router=useRouter()
  const navTo=()=>{
    router.push(`/orderDetail/${props.info.id}`)
  }
</script>

<style lang="less" scoped>
.item{
  display: flex;
  margin-top: 10px;
  margin-bottom: 10px;
  flex-direction: column;
  width: 375px;
  box-sizing: border-box;
  padding: 10px 20px;
  height: 109px;
  background: #FFFFFF;
  justify-content: space-between;
  box-shadow: 0px 2px 8px 0px rgba(0,0,0,0.14);
  &__top{
    display: flex;
    justify-content: space-between;
    &-title{
      font-size: 20px;
      font-family: PingFangSC-Semibold, PingFang SC;
      font-weight: 600;
      color: #000000;
    }
    &-status{
      font-size: 15px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #1B76FF;
    }
  }
  &__bottom{
    display: flex;
    justify-content: space-between;
    &-date{
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #9B9B9B;
    }
    &-number{
      font-size: 14px;
      font-family: SourceHanSansCN-Regular, SourceHanSansCN;
      font-weight: 400;
      color: #000000;
    }
  }
}
</style>